import { ref } from "vue";
import { API } from "../api";
import { MUserEntity } from "../api/_Api";

export const useUserList = () => {
  const list = ref([] as MUserEntity[]);
  async function getListFunc() {
    const {
      data: { data },
    } = await API.userControllerGetMUserList();
    list.value = data || [];
  }
  getListFunc();
  return { userList: list, getListFunc };
};
